\(\int \frac {A+B x}{x \sqrt {a+b x}} \, dx\) [428]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 40 \[ \int \frac {A+B x}{x \sqrt {a+b x}} \, dx=\frac {2 B \sqrt {a+b x}}{b}-\frac {2 A \text {arctanh}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}} \]

[Out]

-2*A*arctanh((b*x+a)^(1/2)/a^(1/2))/a^(1/2)+2*B*(b*x+a)^(1/2)/b

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {81, 65, 214} \[ \int \frac {A+B x}{x \sqrt {a+b x}} \, dx=\frac {2 B \sqrt {a+b x}}{b}-\frac {2 A \text {arctanh}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}} \]

[In]

Int[(A + B*x)/(x*Sqrt[a + b*x]),x]

[Out]

(2*B*Sqrt[a + b*x])/b - (2*A*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/Sqrt[a]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 81

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[b*(c + d*x)^
(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rubi steps \begin{align*} \text {integral}& = \frac {2 B \sqrt {a+b x}}{b}+A \int \frac {1}{x \sqrt {a+b x}} \, dx \\ & = \frac {2 B \sqrt {a+b x}}{b}+\frac {(2 A) \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x}\right )}{b} \\ & = \frac {2 B \sqrt {a+b x}}{b}-\frac {2 A \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.00 \[ \int \frac {A+B x}{x \sqrt {a+b x}} \, dx=\frac {2 B \sqrt {a+b x}}{b}-\frac {2 A \text {arctanh}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}} \]

[In]

Integrate[(A + B*x)/(x*Sqrt[a + b*x]),x]

[Out]

(2*B*Sqrt[a + b*x])/b - (2*A*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/Sqrt[a]

Maple [A] (verified)

Time = 1.38 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.88

method result size
derivativedivides \(\frac {2 B \sqrt {b x +a}-\frac {2 A b \,\operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )}{\sqrt {a}}}{b}\) \(35\)
default \(\frac {2 B \sqrt {b x +a}-\frac {2 A b \,\operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )}{\sqrt {a}}}{b}\) \(35\)
pseudoelliptic \(-\frac {2 \left (A b \,\operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )-\sqrt {a}\, \sqrt {b x +a}\, B \right )}{b \sqrt {a}}\) \(38\)

[In]

int((B*x+A)/x/(b*x+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/b*(B*(b*x+a)^(1/2)-A*b/a^(1/2)*arctanh((b*x+a)^(1/2)/a^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 94, normalized size of antiderivative = 2.35 \[ \int \frac {A+B x}{x \sqrt {a+b x}} \, dx=\left [\frac {A \sqrt {a} b \log \left (\frac {b x - 2 \, \sqrt {b x + a} \sqrt {a} + 2 \, a}{x}\right ) + 2 \, \sqrt {b x + a} B a}{a b}, \frac {2 \, {\left (A \sqrt {-a} b \arctan \left (\frac {\sqrt {b x + a} \sqrt {-a}}{a}\right ) + \sqrt {b x + a} B a\right )}}{a b}\right ] \]

[In]

integrate((B*x+A)/x/(b*x+a)^(1/2),x, algorithm="fricas")

[Out]

[(A*sqrt(a)*b*log((b*x - 2*sqrt(b*x + a)*sqrt(a) + 2*a)/x) + 2*sqrt(b*x + a)*B*a)/(a*b), 2*(A*sqrt(-a)*b*arcta
n(sqrt(b*x + a)*sqrt(-a)/a) + sqrt(b*x + a)*B*a)/(a*b)]

Sympy [A] (verification not implemented)

Time = 0.87 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.35 \[ \int \frac {A+B x}{x \sqrt {a+b x}} \, dx=\begin {cases} \frac {2 A \operatorname {atan}{\left (\frac {\sqrt {a + b x}}{\sqrt {- a}} \right )}}{\sqrt {- a}} + \frac {2 B \sqrt {a + b x}}{b} & \text {for}\: b \neq 0 \\\frac {A \log {\left (B x \right )} + B x}{\sqrt {a}} & \text {otherwise} \end {cases} \]

[In]

integrate((B*x+A)/x/(b*x+a)**(1/2),x)

[Out]

Piecewise((2*A*atan(sqrt(a + b*x)/sqrt(-a))/sqrt(-a) + 2*B*sqrt(a + b*x)/b, Ne(b, 0)), ((A*log(B*x) + B*x)/sqr
t(a), True))

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.18 \[ \int \frac {A+B x}{x \sqrt {a+b x}} \, dx=\frac {A \log \left (\frac {\sqrt {b x + a} - \sqrt {a}}{\sqrt {b x + a} + \sqrt {a}}\right )}{\sqrt {a}} + \frac {2 \, \sqrt {b x + a} B}{b} \]

[In]

integrate((B*x+A)/x/(b*x+a)^(1/2),x, algorithm="maxima")

[Out]

A*log((sqrt(b*x + a) - sqrt(a))/(sqrt(b*x + a) + sqrt(a)))/sqrt(a) + 2*sqrt(b*x + a)*B/b

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.90 \[ \int \frac {A+B x}{x \sqrt {a+b x}} \, dx=\frac {2 \, A \arctan \left (\frac {\sqrt {b x + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} + \frac {2 \, \sqrt {b x + a} B}{b} \]

[In]

integrate((B*x+A)/x/(b*x+a)^(1/2),x, algorithm="giac")

[Out]

2*A*arctan(sqrt(b*x + a)/sqrt(-a))/sqrt(-a) + 2*sqrt(b*x + a)*B/b

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.80 \[ \int \frac {A+B x}{x \sqrt {a+b x}} \, dx=\frac {2\,B\,\sqrt {a+b\,x}}{b}-\frac {2\,A\,\mathrm {atanh}\left (\frac {\sqrt {a+b\,x}}{\sqrt {a}}\right )}{\sqrt {a}} \]

[In]

int((A + B*x)/(x*(a + b*x)^(1/2)),x)

[Out]

(2*B*(a + b*x)^(1/2))/b - (2*A*atanh((a + b*x)^(1/2)/a^(1/2)))/a^(1/2)